package com.aqie.gateway;


import lombok.AllArgsConstructor;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author: aqie
 * @create: 2020-07-03 19:40
 **/
@RequestMapping("/")
@RestController
@AllArgsConstructor
public class HelloController {
    @Resource
    private RedisTemplate redisTemplate;

    @GetMapping("/hello")
    public String hello(){
        String name = (String)redisTemplate.opsForValue().get("name");
        return "hello gateway "+ name;
    }



}
